package com.cn.wanxi.service;

import com.cn.wanxi.dao.NavDao;
import com.cn.wanxi.model.NavModel;

import java.util.ArrayList;
import java.util.List;

public class NavService {
    public List<NavModel> getNavModelList() {
        List<NavModel> navModelList = new ArrayList<>();
//        navModelList.add(new NavModel("aaa", ""));
        NavDao navDao = new NavDao();
//        navDao.setHref();
        for (int i = 0; i < navDao.getTitle().length; i++) {
            NavModel model = new NavModel();
            model.setHref(navDao.getHref()[i]);
            model.setTitle(navDao.getTitle()[i]);
            navModelList.add(model);
//            navModelList.add(new NavModel(navDao.getTitle()[i], navDao.getHref()[i]));
        }
        return navModelList;
    }
}
